//============================================================================
// Name        : resource_manager.cpp
// Author      : ferranferri
// Version     :
// Copyright   : Your copyright notice
// Description : Hello World in C++, Ansi-style
//============================================================================

#include <iostream>
#include "core/core_utils.h"
#include "resource_system/resourceManager.h"
#include "resource_system/xmlHelper.h"
#include "Log/LogSystem.h"

using namespace std;

const std::string APP = "[XML_APPENDER]";

int main() {

	//inicializacion del resource manager
	lpe::resman::ResManager::initSingleton();
	lpe::resman::ResManager& rm = lpe::resman::ResManager::getSingleton();
	rm.init();
	// Aqui vamos a deployar dos ficheros
	try{
		cout << rm.getRawFileByName("main","hola.txt") << endl;
		cout << rm.getRawFileByName("main","test.txt") << endl;
		rm.loadResource("main","res1.xml");

	}catch(std::exception& e)
	{
		std::cout << e.what() << std::endl;
	}
	//glog::CGlobalLog::getSingleton().processMessages();
	//glog::CGlobalLog::destroySingleton();
	lpe::resman::ResManager::destroySingleton();

	return 0;
}
